package com.gxuwz.attend.service.Impl;

import com.gxuwz.attend.dao.StudentDao;
import com.gxuwz.attend.entity.Student;
import com.gxuwz.attend.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao;

    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }
    /**
     * 添加学生数据
     * @param student
     */
    @Override
    public void insertStudent(Student student){
        studentDao.insertStudent(student);
    }
    /**
     * 删除学生数据
     * @param id
     */
    @Override
    public void deleteStudent(String id){
        studentDao.deleteStudent(id);
    }
    /**
     * 更新学生数据
     * @param student
     */
    @Override
    public void updateStudent(Student student){
        studentDao.updateStudent(student);
    }
    /**
     * 查询全部学生数据
     * @return
     */
    @Override
    public List<Student> queryStudents(){
        return studentDao.queryStudents();
    }
    /**
     * 模糊查询学生数据
     * @param student
     * @return
     */
    @Override
    public List<Student> queryStudent(Student student){
        return studentDao.queryStudent(student);
    }
}
